<html>
<head>
<script type="text/javascript">
	var aJaxURL			= "server-side/warehouse.action.php";
	var aJaxURL1		= "server-side/document.action.php";				//server side folder url
	var tName			= "table";														//table name
	var fName			= "add-edit-form";												//form name
    var tbName			= "tabs";														//tabs name

	$(document).ready(function () {
		GetTabs(tbName);
		LoadTable();
	});

    $(document).on("tabsactivate", "#tabs", function() {
    	LoadTable();
    });
	 function LoadTable() {
		 var tab = GetSelectedTab(tbName);
		 t_name=tName+"-"+tab;
		// GetDataTable(tname, aJaxURL, action, count, data, hidden, length, sorting, sortMeth, total)
		 GetDataTable(t_name, aJaxURL, "get_list", 4 , "tab="+tab, 0, "", 1, "desc");
		 //$("#" + tName + " tbody").off("dblclick", "tr");
		 SetEvents('','','',t_name,fName,aJaxURL1,'tab='+tab+"&rw=wr");
		 //SetEvents('','','',t_name,fName+tab,aJaxURL,'tab='+tab);
     }
		function LoadDialog(fName){
			var buttons = {
			        "cancel": {
			            text: "დახურვა",
			            id: "cancel-dialog",
			            click: function () {
			                $(this).dialog("close");

			            }
			        }
			};
			GetDialog(fName, "auto", "auto", buttons);
		}

</script>
</head>

<body>
	<div id="tabs" style="width: 820px; margin: 0 auto; min-height: 768px;">
		<ul>
			<li><a href="#tab-0">შეკვეთა</a></li>
			<li><a href="#tab-1">წარმოებაშია</a></li>
			<li  style="display: none; visibility: hidden;"><a href="#tab-2">წარმობა დასრულებულია</a></li>
			<li><a href="#tab-3">მზადაა</a></li>
			<li><a href="#tab-4">გზაშია</a></li>
			<li><a href="#tab-5">შესრულებულია</a></li>
		</ul>

	<div id="tab-0">
	    <div id="dt_example" class="ex_highlight_row">
	        <div id="container">
	            <div id="dynamic">
	                <h2 align="center">შეკვეთა</h2>
		        	<div id="button_area">
		        	</div>
	                <table class="display" id="table-0">
	                    <thead>
	                        <tr id="datatable_header">
	                            <th>ID</th>
	                            <th style="width: 200px">თარიღი</th>
								<th class="min">ბარათის ნომერი</th>
	                            <th style="width: 100%">ფილიალი</th>

	                        </tr>
	                    </thead>
	                    <thead>
	                        <tr class="search_header">
	                            <th class="colum_hidden">
	                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_aleter" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                        </tr>
	                    </thead>

	                </table>
	            </div>
	            <div class="spacer">
	            </div>
	        </div>
	    </div>
    </div>
    <div id="tab-1">
    	    <div id="dt_example" class="ex_highlight_row">
	        <div id="container">
	            <div id="dynamic">
	                <h2 align="center">წარმოებაშია</h2>
		        	<div id="button_area">
		        	</div>
	                <table class="display" id="table-1">
	                    <thead>
							<tr id="datatable_header">
	                            <th>ID</th>
	                            <th style="width: 200px">თარიღი</th>
								<th class="min">ბარათის ნომერი</th>
	                            <th style="width: 100%">ფილიალი</th>

	                        </tr>
	                    </thead>
	                    <thead>
	                        <tr class="search_header">
	                            <th class="colum_hidden">
	                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_aleter" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                        </tr>
	                    </thead>
	                </table>
	            </div>
	            <div class="spacer">
	            </div>
	        </div>
	    </div>
    </div>
    <div id="tab-2">
        	    <div id="dt_example" class="ex_highlight_row">
	        <div id="container">
	            <div id="dynamic">
	                <h2 align="center">წარმ.დასრულებული</h2>
	                <div id="button_area">
		        	</div>
	                <table class="display" id="table-2">
	                    <thead>
							<tr id="datatable_header">
	                            <th>ID</th>
	                            <th style="width: 200px">თარიღი</th>
								<th class="min">ბარათის ნომერი</th>
	                            <th style="width: 100%">ფილიალი</th>

	                        </tr>
	                    </thead>
	                    <thead>
	                        <tr class="search_header">
	                            <th class="colum_hidden">
	                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_aleter" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                        </tr>
	                    </thead>
	                </table>
	            </div>
	            <div class="spacer">
	            </div>
	        </div>
	    </div>
    </div>

    <div id="tab-3">
        	    <div id="dt_example" class="ex_highlight_row">
	        <div id="container">
	            <div id="dynamic">
	                <h2 align="center">წარმოება  დასრულებულია</h2>
	                <table class="display" id="table-3">
	                    <thead>
							<tr id="datatable_header">
	                            <th>ID</th>
	                            <th style="width: 200px">თარიღი</th>
								<th class="min">ბარათის ნომერი</th>
	                            <th style="width: 190px">ფილიალი</th>

	                        </tr>
	                    </thead>
	                    <thead>
	                        <tr class="search_header">
	                            <th class="colum_hidden">
	                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_aleter" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                        </tr>
	                    </thead>
	                </table>
	            </div>
	            <div class="spacer">
	            </div>
	        </div>
	    </div>
    </div>
     <div id="tab-4">
        	    <div id="dt_example" class="ex_highlight_row">
	        <div id="container">
	            <div id="dynamic">
	                <h2 align="center">გზაშია</h2>
	                <div id="button_area">
		        	</div>
	                <table class="display" id="table-4">
	                    <thead>
							<tr id="datatable_header">
	                            <th>ID</th>
	                            <th style="width: 200px">თარიღი</th>
								<th class="min">ბარათის ნომერი</th>
	                            <th style="width: 100%">ფილიალი</th>

	                        </tr>
	                        </tr>
	                    </thead>
	                    <thead>
	                        <tr class="search_header">
	                            <th class="colum_hidden">
	                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_aleter" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                        </tr>
	                    </thead>
	                </table>
	            </div>
	            <div class="spacer">
	            </div>
	        </div>
	    </div>
    </div>
         <div id="tab-5">
        	    <div id="dt_example" class="ex_highlight_row">
	        <div id="container">
	            <div id="dynamic">
	                <h2 align="center">შესრულებულია</h2>
	                <div id="button_area">
		        	</div>
	                <table class="display" id="table-5">
	                    <thead>
							<tr id="datatable_header">
	                            <th>ID</th>
	                            <th style="width: 200px">თარიღი</th>
								<th class="min">ბარათის ნომერი</th>
	                            <th style="width: 100%">ფილიალი</th>

	                        </tr>
	                    </thead>
	                    <thead>
	                        <tr class="search_header">
	                            <th class="colum_hidden">
	                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_aleter" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                            <th>
	                                <input type="text" name="search_client" value="ფილტრი" class="search_init" />
	                            </th>
	                        </tr>
	                    </thead>
	                </table>
	            </div>
	            <div class="spacer">
	            </div>
	        </div>
	    </div>
    </div>
    </div>
	<div>
		<input type="hidden" id="chechedStatus" value="true"/>
    </div>
	<div id="add-edit-form" class="form-dialog" title="ბლანკი">
    	<!-- aJax -->
	</div>
    <div id="packing-form" class="form-dialog" title="შეფუთვა">
    	<!-- aJax -->
	</div>
    <div id="inner-pack-form" class="form-dialog" title="კატრიჯის შეფუთვა">
    	<!-- aJax -->
	</div>
    <div id="cartridge-receive-form" class="form-dialog" title="კატრიჯის მიღება">
    	<!-- aJax -->
	</div>
</body>
</html>